﻿using System;

namespace Borg
{
    public interface IDispatcher : IDisposable
    {
        bool IsDisposed { get; }

        event DispatcherEventHandler DisposeStarted;
        event DispatcherEventHandler DisposeFinished;

        event UnhandledExceptionEventHandler UnhandledException;

        void BeginDispose();

        bool CheckAccess();
        void VerifyAccess();

        bool IsIdle();

        IDispatcherOperation BeginInvoke(Delegate @delegate, params object[] @params);

        object Invoke(Delegate @delegate, params object[] @params);
    }
}
